package com.jrj.action;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import com.jrj.util.ConfigUtil;

/**
 *@author zhiming.li
 *@version createTime：2011-12-26 下午12:00:23
 */
public class JdbcAction {
	
	
	public static Connection getConnection(){
		Connection con = null;
		String url = ConfigUtil.getInstance().getString("db.url.mysql");
		String userName = ConfigUtil.getInstance().getString("db.username.mysql");
		String passWord = ConfigUtil.getInstance().getString("db.pwd.mysql");
		try {
			con = DriverManager.getConnection(url, userName, passWord);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return con;
	}
	
	public static void main(String[] args) {
		System.out.println(getConnection());
	}
}
